package com.ruoyi.project.xkx.student.controller;

import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.xkx.student.service.AdviserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/student/Adviser")
public class AdviserController {
    @Autowired
    private AdviserService adviserService;

    @GetMapping("/listAdviser/{schoolId}")
    public AjaxResult getAdviser(@PathVariable Integer schoolId){
        return AjaxResult.success(adviserService.getAdviser(schoolId));
    }

    @GetMapping("/listAdviser")
    public AjaxResult getAdviser(){
        return AjaxResult.success(adviserService.getAllAdviser());
    }

}
